#pragma once
#include <windows.h>
#include <d3d11.h>
#include <d3dx11.h>
#include <d3dcompiler.h>
#include <xnamath.h>
#include "D3DVoxelTechniqueOne.h"
#include "D3DVoxelTechniqueTwo.h"
#include "D3DVoxelChunk.h"
#include "D3DTransform.h"
\
//#include "D3DConstants.h"
#include <vector>
#define VOXEL_TECHNIQUE   D3DVoxelTechniqueTwo
using namespace std;
class VoxelTerrain
{
	ID3D11Device*							     m_pDevice; 
	ID3D11DeviceContext*                 m_pImmediateContext;

	D3DVoxelTechniqueOne*              m_pVoxelChunkManager;

	vector<D3DVoxelChunk *> * pChunks;

public:
	VoxelTerrain(ID3D11Device *, ID3D11DeviceContext *);
	void Init();
	void Render( ID3D11Buffer *, ID3D11Buffer *);
	void Release(void);
	static float SimplexFractalTerraced2(D3DXVECTOR3 Pos);
	void WriteVoxel(int x, int y, int z, Voxel * pVoxel);

};


